<?php


namespace app\api\validate;


use app\common\validate\BaseValidate;

class LoginValidate extends BaseValidate
{
    protected $rule = [
        'username' => 'require',
        'password' => 'require',
        'mobile' => 'require',
        'code' => 'require',
    ];

    protected $field = [
        'username' => '账号',
        'password' => '密码',
        'mobile' => '手机号',
        'code' => '验证码',
    ];
    protected $scene = [
        "id" => [
            'id',
        ],
        "loginByAccount" => [
            'username',
            'password',
        ],
        "loginByMobile" => [
            'mobile',
            'code',
        ],
    ];
}